package edu.xidian.onlinedocument.utils.ot.internal.operations;

import edu.xidian.onlinedocument.utils.ot.internal.Text;

public class Delete extends Change {
    /**
     * 从当前位置开始向后删length长度的字符
     */
    private int length;

    public Delete(int length) {
        this.length = length;
    }

    /*
    @Override
    public Text apply(int position, Text text) {
        // text.buffer.delete(lo, lo + len);
        // transformMarkupAgainstDelete(text.markup, lo, len);
        return text;
    }
     */

    @Override
    public Integer offset() {
        return length;
    }

    @Override
    public String value() {
        return null;
    }

    @Override
    public String toString() {
        return "{ delete: " + length + " }";
    }
}
